#include "widget.h"
#include "ui_widget.h"
#include <QtDebug>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::moveEvent(QMoveEvent *e)
{
    int R = QRandomGenerator64::global()->bounded(255);
    int G = QRandomGenerator64::global()->bounded(255);
    int B = QRandomGenerator64::global()->bounded(255);

    QString qss = QString("background-color: rgb(%1, %2, %3);")
                    .arg(R).arg(G).arg(B);


    this->setStyleSheet(qss);
}

